#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
    double x;
    cout<<"vvedite x"<<endl;
    cin>>x;
    cout<<4*pow(x-3,6)-7*pow(x-3,3)+2;
}
